Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support custom URL parameters in a GetLegendGraphic request for a layer without a style configured #7263

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sidneygijzen
Copy link

@sidneygijzen sidneygijzen commented Aug 28, 2024

What this PR does

Fixes #7198

This PR addresses aforementioned issue by reusing an existing constant QUERY_PARAMETERS_TO_REMOVE to create a base URL for a legendGraphic request. I've added a new getter on WebMapServiceCatalogItem so the getter can be reused in the future.

Test me

A unit test is added to test this behaviour. The new test was failing before I applied the proposed change.

Manual testing:

The 'before' situation can be viewed with this ci.terria.io link. If one:

  • clicks 'explore map data'
  • selects 'test' and then 'af250m_nutrient dataset and
  • adds map layer 'Africa SoilGrids nutrients - Extractable Aluminium (Al)'

After adding the layer, the legendGraphic fails to load in the 'before' situation.

This gist can be used in testing the 'after' situation. When adding aforementioned layer, the legend graphic should be visible. I've tried to prepare an 'after' test by using ci.terria.io, but I think I can only use this method with branches existing on the official terriajs repo? If not, I would love to know how to create a ci.terria.io link with a branch from a forked repo.

Checklist

  • There are unit tests to verify my changes are correct
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

@sidneygijzen sidneygijzen marked this pull request as ready for review August 28, 2024 16:13
@CLAassistant
Copy link

CLAassistant commented Oct 4, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wms getlegendgraphic does not include custom parameters
2 participants